package cn.south.campus.business.controller;

import cn.south.campus.business.model.vo.StudentVo;
import cn.south.campus.business.service.StudentService;
import cn.south.campus.common.model.bo.Result;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 学生认证表 前端控制器
 * </p>
 *
 * @author chow
 * @since 2024-11-13
 */
@RestController
@RequestMapping("/campus/student")
@AllArgsConstructor
public class StudentController {

    private final StudentService studentService;

    @PostMapping("auth")
    public Result<String> auth(@RequestBody StudentVo req) {
        studentService.auth(req);
        return Result.success("提交成功");
    }

    @GetMapping("info")
    public Result<StudentVo> getAuthInfo() {
        return Result.success(studentService.getAuthInfo());
    }
}
